#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''=================================================
@Project -> File   ：FastRiteApi -> outbound_order
@IDE    ：PyCharm
@Author ：Json
@Date   ：2025/3/20 14:27
@Desc   ：
=================================================='''
from ...base.client import Client
from ...base.helpers import sp_endpoint


class InboundOrder(Client):
    sbu_path = 'inboundOrder'

    @sp_endpoint(f'/{sbu_path}/create')
    def create(self, **kwargs):
        """
        创建出库订单
        :param kwargs:
        :return:
        """
        return self._request(kwargs.pop('path'), data={**kwargs})

    @sp_endpoint(f'/{sbu_path}/pageList')
    def page_list(self, **kwargs):
        """
        入库单列表
        :param kwargs:
        :return:
        """
        return self._request(kwargs.pop('path'), data={**kwargs})


    @sp_endpoint(f'/{sbu_path}/detail')
    def detail(self, **kwargs):
        """
        入库单详情
        :param kwargs:
        :return:
        """
        return self._request(kwargs.pop('path'), data={**kwargs})

    @sp_endpoint(f'/{sbu_path}/cancel')
    def cancel(self, **kwargs):
        """
        取消入库订单
        :param kwargs:
        :return:
        """
        return self._request(kwargs.pop('path'), data={**kwargs})

    @sp_endpoint(f'/{sbu_path}/pageBoxSkuList')
    def page_box_sku_list(self, **kwargs):
        """
        取消出库订单
        :param kwargs:
        :return:
        """
        return self._request(kwargs.pop('path'), data={**kwargs})
